package routers

import (
	"gin_study_blog/api"
	"gin_study_blog/middleware"
)

func (r RouterGroup) CommentRouter() {
	commentApi := api.ApiGroupApp.CommentApi
	// 添加评论
	r.POST("comment", middleware.JwtUserAuth(), middleware.JwtAdminAuth(), commentApi.CommentCreateView)
	// 评论列表
	r.GET("list", commentApi.CommentListView)
	// 评论点赞
	r.GET("comment/:id", commentApi.CommentDIggView)
	r.DELETE("comment/:id", commentApi.CommentDeleteView)
}
